<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>flex-主轴上的排列方式</title>
    <style>
        div{
            /* 一定要写上flex属性 */
            display: flex;
            width: 800px;
            height: 300px;
            background-color: pink;
            /* 一定要设置主轴！！！ */
            flex-direction: row;
            /* justify-content：设置主轴上的排列方式 */
            /* 1、从头部开始，从左到右排列 */
            /* justify-content: flex-start; */
            /* 2、从尾部开始，顺序不变 */
            /* justify-content: flex-end; */
            /* 3、在主轴上居中对齐 */
            /* justify-content: center; */
            /* 4、平分剩余空间 */
            /* justify-content: space-around; */
            /* 5、两边贴边，在平分剩余空间 */
            justify-content: space-between;
        }
        div span{
            width: 150px;
            height: 100px;
            background-color: purple;
        }
    </style>
</head>
<body>
    <div>
        <span>1</span><span>2</span><span>3</span><span>4</span>
    </div>
</body>
</html>